<?php
class action{
    function __construct($c=null){
    	$_NAV = $_LANG = array();
    	$app = isset($_GET['app'])?$_GET['app']:null;
        include_once(ROOT_PATH.'language/cn/admin/common.php');
        include_once(ADMIN_PATH.'common/menu.php');
        $GLOBALS['smarty']->assign('lang', $_LANG);
        $GLOBALS['smarty']->assign('nav', $_NAV);
        $GLOBALS['smarty']->assign('admin_name', isset($_SESSION['admin_name'])?$_SESSION['admin_name']:null);
        $GLOBALS['smarty']->assign('app', $app);
        unset($_NAV, $_LANG);
    }
    
    function __destruct(){
        unset($this);
    }
    
    function makeError($msg){
        die($msg);
    }
    
    function index(){
        die('default index');
    }
    
    function direct($app, $act=null){
    	$domain = get_domain().ADMIN_EXT;
    	header('Location: http://'. $domain.'?app='.$app.'&act='.$act);
    }
}
?>